<?php
require_once('config.php');
require_once('db.php');
connectdb($servername,$dbname,$dbusername,$dbpassword);
$id=$_GET['id'];
$sql="DELETE FROM $dbtable WHERE id='$id'";
$result=mysql_query($sql);
// if successfully updated.
if($result){
	$message = urldecode("<b>Delete successfully</b>");
	header("Location: sites.php?id=$id&message=" . $message);
}else{
	$message = urldecode("There is an MySQL error occurred: <b>" . mysql_error($link) . "</b>");
	header("Location: sites.php?id=$id&message=" . $message);
}

?>